

$(function() {


    //回到顶部
    $(document).scroll(function(){
        set();
    });
    $('.fix-block-r,footer').on('click', ".gotop",function (){
        btn = $(this)[0];
        this.timer=setInterval(function(){
            $(window).scrollTop(Math.floor($(window).scrollTop()*0.8));
            if($(window).scrollTop()==0) clearInterval(btn.timer,set);
        },10);
    });
    function set(){$(window).scrollTop()==0 ? $('#goTopBtn').addClass('hide') : $('#goTopBtn').removeClass('hide');}
});
/*(function($) {
    $.extend($, {

        /!**
         * 从右到左动态显示隐藏内容
         *
         *!/
        animationLeft: function(options) {
            var defaults = {
                    valve : '.animation-left',          // 动作触发
                    wrapper : '.nctouch-full-mask',    // 动作块
                    scroll : ''     // 滚动块，为空不触发滚动
            }
            var options = $.extend({}, defaults, options);
            function _init() {
                $(options.valve).click(function(){
                    $(options.wrapper).removeClass('hide').removeClass('right').addClass('left');
                    /!*if (options.scroll != '') {
                        if (typeof(myScrollAnimationLeft) == 'undefined') {
                            if (typeof(IScroll) == 'undefined') {
                                $.ajax({
                                    url: WapSiteUrl+'/js/iscroll.js',
                                    dataType: "script",
                                    async: false
                                });
                            }
                            myScrollAnimationLeft = new IScroll(options.scroll, { mouseWheel: true, click: true });
                        } else {
                            myScrollAnimationLeft.refresh();
                        }
                    }*!/
                });
                $(options.wrapper).on('click', '.header-l > a', function(){
                    $(options.wrapper).addClass('right').removeClass('left');
                });
            }
            return this.each(function() {
                _init();
            })();
        },
    });
})(Zepto);*/

